GBML manual / Paths

path_length

A path’s total length in pixels (after smoothing is sampled into straight segments, S3.9).

Syntax

path_length(p) -> real

Arguments

NameType
ppath

Returns

real

Description

A path's total length in pixels, measured after smoothing has already been sampled into straight segments at build time - a run-time query against build-time-computed data, not a curve-length calculation done live.

Example

var total = path_length(path_doc_patrol);

Reads path_doc_patrol's own total length in pixels, already sampled from its authored points (and any smoothing) at build time - not something this recomputes on every call.

See also: path_point_countpath_x_at